$networkServiceAccount = new-object -typeName "System.Security.Principal.NTAccount" "NETWORK SERVICE"
$pureSid = $networkServiceAccount.Translate([System.Security.Principal.SecurityIdentifier]).Value
$completeSid = "<SID=$pureSid>"

$entry = new-object -typeName "System.DirectoryServices.DirectoryEntry" "LDAP://localhost:61000/CN=Administrators, CN=Roles, O=Extranet"
$properties = $entry.psbase.Properties["member"]
$properties.Add([System.String]$completeSid)
$entry.psbase.CommitChanges();